Skip to content

Improving parallel MC use-case example #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Mar 22, 2023
Merged

Improving parallel MC use-case example #26

merged 2 commits into from
Mar 22, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

This PR fixes the implementation to run on Windows following excellent article from super-fast-python.

It also updates README.md document to identify which script to run to solve which problem, and provide
sample outputs.

On Windows one needs to use multiprocessing.Manager to create
the barrier to be shared across workers, and passed to worker
initialization routine as argument.

Also passed batch_size to routines as keyword argument, and in
parallel_mc.py passed mc_worker_func to worker initialization
routine as keyword argument, which assigns to process-global
variable for reuse by subsequent MC computation tasks.
@oleksandr-pavlyk oleksandr-pavlyk requested a review from samaid March 22, 2023 16:06
@samaid
Copy link
Contributor

samaid commented Mar 22, 2023

Very nice! I saw this paper too

@samaid samaid merged commit d1dd3ba into master Mar 22, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the example-work branch September 5, 2023 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants